package org.example.device.control;

import java.util.Map;

/**
 * 设备控制命令
 * 统一设备控制指令的数据结构
 */
public class DeviceControlCommand {
    
    private Long deviceId;
    private String commandType; // 命令类型：switch, brightness, temperature, color等
    private Object value; // 命令值
    private Map<String, Object> parameters; // 额外参数
    private String action; // 操作描述
    private Long userId; // 操作用户ID
    private Long timestamp; // 时间戳
    
    public DeviceControlCommand() {}
    
    public DeviceControlCommand(Long deviceId, String commandType, Object value) {
        this.deviceId = deviceId;
        this.commandType = commandType;
        this.value = value;
        this.timestamp = System.currentTimeMillis();
    }
    
    // Getter和Setter方法
    public Long getDeviceId() {
        return deviceId;
    }
    
    public void setDeviceId(Long deviceId) {
        this.deviceId = deviceId;
    }
    
    public String getCommandType() {
        return commandType;
    }
    
    public void setCommandType(String commandType) {
        this.commandType = commandType;
    }
    
    public Object getValue() {
        return value;
    }
    
    public void setValue(Object value) {
        this.value = value;
    }
    
    public Map<String, Object> getParameters() {
        return parameters;
    }
    
    public void setParameters(Map<String, Object> parameters) {
        this.parameters = parameters;
    }
    
    public String getAction() {
        return action;
    }
    
    public void setAction(String action) {
        this.action = action;
    }
    
    public Long getUserId() {
        return userId;
    }
    
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    public Long getTimestamp() {
        return timestamp;
    }
    
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
}
